<?php session_start(); ?>
<?php include "libfunc.php";?>
<?php if (!empty($_SESSION['admUser']) && !empty($_SESSION['admPass'])) { ?>
<html>
 <head>
  <title>.: Penjual Room ClothingCorp :.</title>
  <link href="admInc/cssMainStyle.css" type="text/css" rel="stylesheet">
  <link href="admInc/cssTableStyle.css" type="text/css" rel="stylesheet">
  <link href="admInc/cssAdditionStyle.css" type="text/css" rel="stylesheet">
  <link href="admInc/cssTableNavigation.css" type="text/css" rel="stylesheet">
 </head>
 <body class="fix">
  <div id="wrapper">
   <div id="header">
    <div class="titleHeader"><center>
     <img src="image/logo2.png" border="0">
	</div><!-- titleHeader //-->
	<div class="subTitleHeader"><center>
	 - Website Penjual Control Panel -
	</div><!-- subTitleHeader //-->
   </div><!-- header //--></center>
   <div id="mainContent">
    <div id="leftColumn">
	 <div class="navigation">
	  <table border="0" width="100%" bgcolor="white">
	  <tr>
	    <td class="headerTable" align="center"><b>Penjual Page</b></td>
	  </tr>
	  <tr>
	    <td><img src="image/tag_blue.png"><a href="penjualLayout.php"> Halaman Utama</a></td>
	  </tr>
	  <tr>
	    <td><img src="image/tag_blue.png"><a href="newInformation.php"> Informasi Terkini</a></td>
	  </tr>
	  <tr>
	    <td><img src="image/tag_blue.png"><a href="LogOut.php" onClick="return confirm('Apakah Anda benar-benar akan keluar dari halaman Admin ?')"> Keluar</a></td>
	  </tr>
	  <tr>
	    <td></td>
	  </tr>
	  <tr>
	    <td></td>
	  </tr>
      <tr>
	    <td></td>
	  </tr>
      <tr>
	    <td></td>
	  </tr>
	  <tr>
	    <td class="headerTable" align="center"><b>Data Kategori</b></td>
	  </tr>
	  <tr>
	    <td><img src="image/tag_blue.png"><a href="view_kategori.php"> View Kategori</a></td>
	  </tr>
	  <tr>
	    <td><img src="image/tag_blue.png"><a href="pencarian_kategori.php"> Pencarian Kategori</a></td>
	  </tr>
      <tr>
	    <td></td>
	  </tr>
      <tr>
	    <td></td>
	  </tr>
	  <tr>
	    <td class="headerTable" align="center"><b>Data Penjual</b></td>
	  </tr>
	  <tr>
	    <td><img src="image/tag_blue.png"><a href="form_edit_penjual.php?"> Edit Profile</a></td>
	  </tr>
	  <tr>
	    <td><img src="image/tag_blue.png"><a href="pencarian_penjual.php"> Pencarian Penjual</a></td>
	  </tr>
      <tr>
	    <td></td>
	  </tr>
      <tr>
	    <td></td>
	  </tr>
	  <tr>
	    <td class="headerTable" align="center"><b>Data Produk</b></td>
	  </tr>
	  <tr>
	    <td><img src="image/tag_blue.png"><a href="view_produk.php"> View Produk</a></td>
	  </tr>
	  <tr>
	    <td><img src="image/tag_blue.png"><a href="pencarian_produk.php"> Pencarian Produk</a></td>
	  </tr>
	  <tr>
		<td></td>
	  </tr>
	  <tr>
		<td></td>
	  </tr>
	  <tr>
		<td></td>
	  </tr>
	  <tr>
	    <td class="headerTable" align="center"><b>Data Pesanan</b></td>
	  </tr>
	  <tr>
	    <td><img src="image/tag_blue.png"><a href="view_pesanan.php"> View Pesanan</a></td>
	  </tr>
	  <tr>
	    <td><img src="image/tag_blue.png"><a href="pencarian_pesanan.php"> Pencarian Pesanan</a></td>
	  </tr>
      <tr>
	    <td></td>
	  </tr>
      <tr>
	    <td></td>
	  </tr>
	  
	</table>
	 </div><!-- navigation //-->
	</div><!-- leftColumn //-->
	<div id="rightColumn">
	 <div class="content">
	 <div class="content">
	  <form method="post" action="proses_tambah_produk2.php" enctype="multipart/form-data">
		  <fieldset>
          <legend>Penambahan Data Produk</legend>
          <table class="tableTask">
			<td>Pilih Penjual</td>
			  <td>
			    <select name="penjual" class="selectStyle">
				<?php 
				  $link = koneksi_db();
				  $sq = "select * from penjual where dihapus='T'";
				  $res_penjual = mysql_query($sq,$link);
				  
				  while ($dt_penjual = mysql_fetch_array($res_penjual)) {?>
				    <option value="<?php echo $dt_penjual['id_penjual']; ?>"><?php echo $dt_penjual['nama']; ?></option>
				  <?php }
				?>
			    </select>
			  </td>
              <td class="trInformation">&laquo; Silakan memilih penjual</td>
			</tr>
			  <td>Pilih Kategori</td>
			  <td>
			    <select name="kategori" class="selectStyle">
				<?php 
				error_reporting(0);
				  $link = koneksi_db();
				  $sql = "select * from kategori where dihapus='T'";
				  $res_kategori = mysql_query($sql,$link);
				  
				  while ($dt_kategori = mysql_fetch_array($res_kategori)) {?>
				    <option value="<?php echo $dt_kategori['id_kategori']; ?>"><?php echo $dt_kategori['nama']; ?></option>
				  <?php }
				?>
			    </select>
			  </td>
              <td class="trInformation">&laquo; Silakan memilih kategori produk</td>
			</tr>
			<tr>
			  <td>Judul Produk</td>
			  <td><input type="text" name="judul" size="30" class="textStyle"></td>
			  <td class="trInformation">&laquo; Silakan isi judul produk</td>
			</tr>
			<td>Kode Produk</td>
			  <td><input type="text" name="kode_produk" size="30" class="textStyle"></td>
			  <td class="trInformation">&laquo; Isi dengan kode unik dari produk</td>
			</tr>
			<tr>
			  <td>Harga</td>
			  <td><input type="text" name="harga" size="30" class="textStyle"></td>
			  <td class="trInformation">&laquo; Isi harga dengan bilangan integer</td>
			</tr>
			<tr>
			  <td>Gambar</td>
			  <td><input type="file" name="fupload" size="24" class="textStyle"></td>
              <td class="trInformation">&laquo; Silahkan masukan gambar produk</td>
			</tr>
			<tr>
			  <td>Stok</td>
			  <td><input type="text" name="stok" size="30" class="textStyle"></td>
			  <td class="trInformation">&laquo; Masukan jumlah stok produk ini</td>
			</tr>
			<tr>
			  <td>Diskon</td>
			  <td><input type="text" name="diskon" size="30" class="textStyle"></td>
			  <td class="trInformation">&laquo; Masukan diskon produk ini</td>
			</tr>
            </table>
            <table border="0" class="tableTask">
            <tr>
			  <td width="114">Deskripsi</td>
            </tr>
            <tr>
			  <td width="441"><textarea name="deskripsi" rows="12" cols="80" class="textStyle"></textarea></td>
            </tr>
			<tr>
			  <td colspan="2" align="center">
                &nbsp;&nbsp;&nbsp;<input type="submit" name="tbl_tambah" value="Tambah" class="buttonStyle">
				<input type="reset" name="tbl_reset" value="Reset" class="buttonStyle">
			  </td>
			  <td width="11"></td>
			</tr>
		  </table>
		
		 </fieldset>
		</form>
        
	 
     <div id="keterangan">
       <fieldset>
         <legend>Keterangan</legend>
         Silakan Mengisi Data Produk Baru !!!
       </fieldset>
     </div>
     </div><!-- content //-->
	</div><!-- rightColumn //-->
   </div><!-- mainContent //-->
  </div><!-- wrapper //-->
 </body>
</html>
<?php
}else{
  echo "<script language='javascript'>alert('Silakan Sign In Terlebih Dahulu')</script>";
  echo "<script language='javascript'>window.location = '../admin/'</script>";
}